package com.hnit.applet.common.constant;

import org.springframework.http.HttpHeaders;

/**
 * 公共常量
 *
 * @author zwj
 */
public interface CommonConstant {
    interface Http_Header {
        String SM2 = "sm2";
        String ACCESS_TOKEN = "Access-Token";
    }

    interface Token {
        String TOKEN_PARAM_KEY = "token";
        String TOKEN_HEADER_KEY = HttpHeaders.AUTHORIZATION;
        String PREFIX_USER_TOKEN = "ft-auth:prefix_user_token_";
    }

    interface Exception {
        String FLOW_EXCEPTION = "FlowException";
        String DEGRADE_EXCEPTION = "DegradeException";
        String PARAM_FLOW_EXCEPTION = "ParamFlowException";
        String SYSTEM_BLOCK_EXCEPTION = "SystemBlockException";
        String AUTHORITY_EXCEPTION = "AuthorityException";
    }

    interface ApiVersion {
        String PARAMTYPE_HEADER = "header";
        String API_VERSION_DESC = "api版本号";
        String API_VERSION = "apiVersion";
        String V1 = "v1";
        String VERSION_V1 = API_VERSION + "=" + V1;
        String V1_1 = "v1.1";
        String VERSION_V1_1 = API_VERSION + "=" + V1_1;
        String V1_2 = "v1.2";
        String VERSION_V1_2 = API_VERSION + "=" + V1_2;
        String V1_3 = "v1.3";
        String VERSION_V1_3 = API_VERSION + "=" + V1_3;
        String V2 = "v2";
        String VERSION_V2 = API_VERSION + "=" + V2;
        String V3 = "v3";
        String VERSION_V3 = API_VERSION + "=" + V3;
        String V4 = "v4";
        String VERSION_V4 = API_VERSION + "=" + V4;
        String V5 = "v5";
        String VERSION_V5 = API_VERSION + "=" + V5;
        String V6 = "v6";
        String VERSION_V6 = API_VERSION + "=" + V6;
        String V7 = "v7";
        String VERSION_V7 = API_VERSION + "=" + V7;
        String V8 = "v8";
        String VERSION_V8 = API_VERSION + "=" + V8;
        String V9 = "v9";
        String VERSION_V9 = API_VERSION + "=" + V9;
        String V10 = "v10";
        String VERSION_V10 = API_VERSION + "=" + V10;
        String V11 = "v11";
        String VERSION_V11 = API_VERSION + "=" + V11;
        String V12 = "v12";
        String VERSION_V12 = API_VERSION + "=" + V12;
        String V13 = "v13";
        String VERSION_V13 = API_VERSION + "=" + V13;
        String V14 = "v14";
        String VERSION_V14 = API_VERSION + "=" + V14;
        String V15 = "v15";
        String VERSION_V15 = API_VERSION + "=" + V15;
        String V16 = "v16";
        String VERSION_V16 = API_VERSION + "=" + V16;
        String V17 = "v17";
        String VERSION_V17 = API_VERSION + "=" + V17;
        String V18 = "v18";
        String VERSION_V18 = API_VERSION + "=" + V18;
        String V19 = "v19";
        String VERSION_V19 = API_VERSION + "=" + V19;
        String V20 = "v20";
        String VERSION_V20 = API_VERSION + "=" + V20;
    }

    interface Sign {
        String COMMA = ",";
        String SLASH = "/";
        String CROSSBAR = "-";
        String POINT = ".";
        String AND = "&";
        String EQUAL = "=";
    }

    interface DateTimeFormat {
        String YMD = "yyyy-MM-dd";
        String YMD_HMS = "yyyy-MM-dd HH:mm:ss";
    }

    interface Message {
        String COMMON_VALID_L_SAVE = "COMMON_VALID_L_SAVE";
        String COMMON_VALID_L_QUERY = "COMMON_VALID_L_QUERY";
        String COMMON_VALID_L_UPDATE = "COMMON_VALID_L_UPDATE";
        String COMMON_VALID_L_DELETE = "COMMON_VALID_L_DELETE";

        String COMMON_ERR_L_SAVE = "COMMON_ERR_L_SAVE";
        String COMMON_ERR_L_QUERY = "COMMON_ERR_L_QUERY";
        String COMMON_ERR_L_UPDATE = "COMMON_ERR_L_UPDATE";
        String COMMON_ERR_L_DELETE = "COMMON_ERR_L_DELETE";
    }
}
